package top.blackr.folivora.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SpringDocConfiguration {

    @Bean
    public OpenAPI springShopOpenAPI() {
        return new OpenAPI()
                .info(new Info().title("Folivora API")
                        .description("folivora api documentation")
                        .version("v1.0.0")
                        .license(new License().name("MIT").url("https://mit-license.org/")))
                .externalDocs(new ExternalDocumentation()
                        .description("folivora Wiki Documentation")
                        .url("https://gitee.com/BlackT_JAVA/folivora/wikis/Home"));
    }

}
